﻿using OnlineCourse.Model.Entity;
using System;
using System.Collections.Generic;
using System.Text;

namespace OnlineCourse.Services.IServices
{
    public interface ICourseService
    {
        /// <summary>
        /// 获取单个课程的全部信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Course GetCourse(Guid id);
        /// <summary>
        /// 查询获取所有的课程列表按分页
        /// </summary>
        /// <param name="total"></param>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        ICollection<Course> GetCourseList(out int total, int page = 1, int pageSize = 6);
        /// <summary>
        /// 增加一个课程记录
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        bool Add(Course course);
        /// <summary>
        /// 删除一个课程记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool Delete(Guid id);
        /// <summary>
        /// 更新一个用户记录
        /// </summary>
        /// <param name="id"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        bool Update(Guid id, User user);
    }

}
